﻿using System.Linq;

namespace Luna.UI.Configuration
{
    public class ConnectorConfigurationViewModel : LunaContainerViewModel
    {
        public GoogleConnectorViewModel Google
        {
            get
            {
                return SubModels.OfType<GoogleConnectorViewModel>().FirstOrDefault();
            }
        }

        public ZohoCRMConnectorViewModel ZohoCRM
        {
            get
            {
                return SubModels.OfType<ZohoCRMConnectorViewModel>().FirstOrDefault();
            }
        }

        public ConnectorConfigurationViewModel()
        {
            AddNew<GoogleConnectorViewModel>();
            AddNew<ZohoCRMConnectorViewModel>();
            Load += ConnectorConfigurationViewModel_Load;
            DisplayName = "ConnectorGroup";
        }

        private void ConnectorConfigurationViewModel_Load(object P_Sender, System.EventArgs e)
        {
        }
    }
}